import Vue from 'vue'
import App from './App.vue'
import router from './router/auth.js'
import store from './store'
// 引入vant组件库  懒加载功能
import Vant, { Lazyload } from 'vant'
import 'vant/lib/index.css'
// 导入事件总线
import eventBus from '@/eventBus.js'

// 加载全局样式
import '@/styles/index.css'
// 引入flexible
import 'amfe-flexible'
import { formatTime, relativeTime } from '@/utils/date-time.js'
// 在vue原型上注册事件总线
Vue.prototype.$eventBus = eventBus
Vue.filter('formatTime', function (val) {
  return formatTime(val)
})
Vue.filter('relativeTime', function (val) {
  return relativeTime(val)
})
Vue.use(Vant)
// 使用懒加载
Vue.use(Lazyload)
Vue.config.productionTip = false
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
